package icu.xuyijie.springbootlearning1.chapter4.apidoc;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * @author 徐一杰
 * @date 2025/03/06 08:53
 * @description 接口文档生成器配置
 */
@SpringBootConfiguration
public class ApiDocConfig {

    @Bean
    public OpenAPI customOpenApi() {
        return new OpenAPI()
                .info(
                        new Info()
                                .title("我的接口文档")
                                .description("这是自动生成的接口文档")
                                .version("1.0.0")
                                .contact(new Contact().url("https://xuyijie.icu").email("1119461672@qq.com"))
                );
    }

}
